package com.base.utils;

import com.github.pagehelper.PageHelper;

import java.util.Map;

/**
 * @author wnhuang
 * @Package com.base.utils
 * @date 2021-1-6 20:04
 */
public class PageHelperUtil {
    public static void startPageUtil(Map<String,Object> pageRequest){
        int PageIndex = 1;
        int PageSize = 10;
        if(pageRequest.get("PageIndex") !=null){
            PageIndex = (int) (pageRequest.get("PageIndex"));
        }
        if(pageRequest.get("PageSize") !=null){
            PageSize = (int) (pageRequest.get("PageSize"));
        }
        PageHelper.startPage(PageIndex, PageSize);
    }
}
